<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()	 {
		Schema::dropIfExists('user');
		
		Schema::create('user', function(Blueprint $table) {
			$table->engine = 'InnoDB';
			
			$table->increments('usr_id');
			$table->string('name', 100);
			$table->string('lastname', 100);
			$table->string('username', 100)->unique();
			$table->string('password', 100);
			$table->date('birthday');
			$table->enum('gender', array('m', 'f', 'o'));
			$table->string('cou_id', 100);
			$table->string('remember_token', 100)->nullable();

			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('user', function(Blueprint $table)
		{
			//
		});
	}

}
